
package org.finegold.core.pay.unionpay.config;

import lombok.AllArgsConstructor;
import org.finegold.core.pay.unionpay.api.UnionPayApi;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 银联配置类
 *
 * @author QinXueFeng
 */
@Configuration
@AllArgsConstructor
@EnableConfigurationProperties({
	BasePayConfig.class,AppPayConfig.class,H5PayConfig.class,QrPayConfig.class
})
public class UnionPayConfiguration {

	@Bean
	public UnionPayApi unionPayApi(BasePayConfig basePayConfig, AppPayConfig appPayConfig, H5PayConfig h5PayConfig, QrPayConfig qrPayConfig) {
		return new UnionPayApi(basePayConfig,appPayConfig,h5PayConfig,qrPayConfig);
	}

}
